import baseUrl from './base-url-config'

const { product: prefix } = baseUrl

export default {
  // 受试者信息列表表头
  getSubjectInfoListTable: {
    url: `${prefix}/edc/subject/manage/getSubjectInfoListTable`,
    method: 'get',
  },

  // 分页查询受试者列表
  getPageSubjectInfo: {
    url: `${prefix}/edc/subject/manage/pageSubjectInfo`,
    method: 'POST',
  },

  // 新增受试者
  addSaveSubject: {
    url: `${prefix}/edc/subject/manage/saveSubject`,
    method: 'POST',
  },

  // 修改受试者信息字段
  editSaveSubject: {
    url: `${prefix}/edc/subject/manage/updateSubjectInfo`,
    method: 'PUT',
  },

  // 查询中心最新发布版本
  getUpdateSubjectInfo: {
    url: `${prefix}/edc/builder/project/coreDatabaseCRF/getCoreDatabaseUpVersion`,
    method: 'GET',
    hasLoading: false
  },

  // 查询受试者详情
  getSubjectInfo: {
    url: `${prefix}/edc/subject/manage/getSubjectInfo`,
    method: 'GET',
  },
  // 查询受试者汇总表格
  getSubjectTotalAPI: {
    url: `${prefix}/edc/subject/summary/list`,
    method: 'POST',
    hasLoading: false
  },
  // 查询受试者汇总图表
  getSubjectSummaryCountAPI: {
    url: `${prefix}/edc/subject/summary/subjectSummaryCount`,
    method: 'POST',
  },
  
  // 导入项目数据集
  importProjectData: {
    url: `${prefix}/edc/subject/summary/importDataSet`,
    method: 'post',
    contentType: 'multipart/form-data',
  },

  // 删除项目数据集
  deleteProjectData: {
    url: `${prefix}/edc/subject/summary/deleteDataSet`,
    method: 'get',
  },
}
